/*
  Copyright (C) 2016 Hyphenate Inc. All rights reserved.
  <p>
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  http://www.apache.org/licenses/LICENSE-2.0
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
 */
package com.kaiwukj.android.ufamily.app.constant;

import com.hyphenate.easeui.EaseConstant;

public class Constant extends EaseConstant {

    public static final boolean isDev = false;//开发环境
    public static final boolean isLocalTest = false;//本地服务测试

    public static final String ACTION_REFRESH = "ACTION_REFRESH";

    public static final String BUS_PHONE = "0791-85662345";
    public static final String BUS_MINE_PHONE = "0791-85662345";

    public static final String NEW_FRIENDS_USERNAME = "item_new_friends";
    public static final String GROUP_USERNAME = "item_groups";
    public static final String CHAT_ROOM = "item_chatroom";
    public static final String ACCOUNT_REMOVED = "account_removed";
    public static final String ACCOUNT_CONFLICT = "conflict";
    public static final String ACCOUNT_FORBIDDEN = "user_forbidden";
    public static final String ACCOUNT_KICKED_BY_CHANGE_PASSWORD = "kicked_by_change_password";
    public static final String ACCOUNT_KICKED_BY_OTHER_DEVICE = "kicked_by_another_device";
    public static final String CHAT_ROBOT = "item_robots";
    public static final String MESSAGE_ATTR_ROBOT_MSGTYPE = "msgtype";
    public static final String ACTION_GROUP_CHANAGED = "action_group_changed";
    public static final String ACTION_CONTACT_CHANAGED = "action_contact_changed";

    public static final String EXTRA_CONFERENCE_ID = "confId";
    public static final String EXTRA_CONFERENCE_PASS = "password";
    public static final String EXTRA_CONFERENCE_INVITER = "inviter";
    public static final String EXTRA_CONFERENCE_IS_CREATOR = "is_creator";
    public static final String EXTRA_CONFERENCE_GROUP_ID = "group_id";

    public static final String MSG_ATTR_CONF_ID = "conferenceId";
    public static final String MSG_ATTR_CONF_PASS = EXTRA_CONFERENCE_PASS;
    public static final String MSG_ATTR_EXTENSION = "msg_extension";

    public static final String EM_CONFERENCE_OP = "em_conference_op";
    public static final String EM_CONFERENCE_ID = "em_conference_id";
    public static final String EM_CONFERENCE_PASSWORD = "em_conference_password";
    public static final String EM_CONFERENCE_TYPE = "em_conference_type";
    public static final String EM_MEMBER_NAME = "em_member_name";

    public static final String OP_INVITE = "invite";
    public static final String OP_REQUEST_TOBE_SPEAKER = "request_tobe_speaker";
    public static final String OP_REQUEST_TOBE_AUDIENCE = "request_tobe_audience";


    /**
     * API HOST
     */
    //public static String API_HOST_CURRENT = "";
    private static final String API_HOST = "http://jylapi.jiayuanli.net";
    private static final String API_HOST_TEST = "http://jyltestapi.jiayuanli.net";
    //public static final String API_HOST_TEST = "http://192.168.188.72:9999";

    //服务详情
    public static final String SERVICE_DETAIL_HOST = "http://serviceh5.jiayuanli.net";
    public static final String SERVICE_DETAIL_HOST_TEST = "http://serviceh5test.jiayuanli.net";
    //public static final String SERVICE_DETAIL_HOST_TEST = "http://192.168.188.82:8899";

    private static final String API_SHOP_HOST = "http://mallh5api.kaiwumace.com";
    private static final String API_SHOP_HOST_TEST = "http://mallh5test.kaiwumace.com";
    private static final String API_SHOP_HOST_LOCAL_TEST = "http://172.168.1.90:8082";

    //七牛云
    private static final String API_QN_HOST = "http://jylqn.kaiwumace.com/";
    private static final String API_QN_HOST_TEST = "http://jylqntest.kaiwumace.com/";
    //private static final String API_QN_HOST_TEST = "http://jylqndev.kaiwumace.com/";

    public static final String API_ZG_HOST = "http://jylzg.kaiwumace.com/";
    public static final String API_ZG_HOST_TEST = "http://jylzgtest.kaiwumace.com/";

    public static final String GM_H5_HOST = "http://jzh5.jiayuanli.net/";
    public static final String GM_H5_HOST_TEST = "http://jzh5test.jiayuanli.net/";

    public static final String LOGIN_TIP_WEB_URL = "http://www.kaiwumace.com/treaty/privacy/ajjf_privacy.html";

    public static final String SERVICE_COMMUNITY_NEWS = getCommunityServiceHost() + "/InformationInfo.html";//社区资讯详情
    public static final String SERVICE_COMMUNITY_ZYZM = getCommunityServiceHost() + "/volunteerRecruitment.html";//志愿招募
    public static final String SERVICE_COMMUNITY_GUIDE = getCommunityServiceHost() + "/guideList.html";//办事指南

    private static final String SERVICE_COMMUNITY_HOST = "http://committeeh5.jiayuanli.net";
    private static final String SERVICE_COMMUNITY_HOST_TEST = "http://committeeh5test.jiayuanli.net";

    public static String getCommunityServiceHost() {
        return isDev ? SERVICE_COMMUNITY_HOST_TEST : SERVICE_COMMUNITY_HOST;
    }


    public static final String WX_APP_ID = "wx93e00ee43a1b727b";//wxc9cfd0071da47652
    public static final String WX_APP_SECRET = "be7342c3634f4ed9286f6fc11bb9d678";

    //智国
    public static final String ZGHL_APPID = "20200618331165";
    public static final String ZGHL_APPSRCRET = "40b4b402b9a7e027d3e52ffd7334811d";
    public static final String ZGHL_APPID_TEST = "20190802861136";
    public static final String ZGHL_APPSRCRET_TEST = "a1366db2bd2d2c127e01895d754ad6a2";

    //环信 1115190326030529#jylprd
    public static final String HX_APPID = "1115190326030529#jylprd";
    //public static final String HX_APPID_TEST = "1115190326030529#communityhui";
    public static final String HX_APPID_TEST = "1115190326030529#jyltest2";


    //保险
    public static final String H5_INSURANCE = "http://www.kaiwumace.com/finance/insurance.html";
    //0首付装修
    public static final String H5_FITMENT = "http://www.kaiwumace.com/finance/renovation.html";
    //借贷
    public static final String H5_DEBIT = "http://www.kaiwumace.com/finance/quota.html";
    //果蔬商超
    public static final String H5_SUPERMARKET = "http://www.kaiwumace.com/finance/list.html";

    //隐私协议
    public static final String H5_PRIVACE = "http://www.kaiwumace.com/treaty/privacy/privacy.html";

    //果蔬商超host
    public static final String SHOP_HOST = "http://mallh5.kaiwumace.com/";
    public static final String SHOP_HOST_TEST = "http://mh5test.kaiwumace.com/";
    public static final String SHOP_HOST_LOCAL_TEST = "http://172.168.1.66:8080/";

    public static String getHost() {
        if (isDev) {
            //String editHost = SPUtils.getInstance("app").getString("host", "");
            return API_HOST_TEST;
        } else {
            return API_HOST;
        }
    }

    public static String getHxAppid() {
        return isDev ? HX_APPID_TEST : HX_APPID;
    }

    public static String getQNHost() {
        return isDev ? API_QN_HOST_TEST : API_QN_HOST;
    }

    public static String getShopUrl() {
        if (isLocalTest) return SHOP_HOST_LOCAL_TEST;
        return isDev ? SHOP_HOST_TEST : SHOP_HOST;
    }

    public static String getShopHost() {
        if (isLocalTest) return API_SHOP_HOST_LOCAL_TEST;
        return isDev ? API_SHOP_HOST_TEST : API_SHOP_HOST;
    }

}
